import { locations } from "../../../../gpu/locations";
export const BasicMaterial_def = /*wgsl*/ `
#if ~{def.material}
  @group(${locations.material[0]}) @binding(${locations.material[1]}) var<uniform> baseMaterial : Material;
#endif
#if ~{def.map}
  @group(${locations.map[0]}) @binding(${locations.map[1]}) var map: texture_2d<f32>;
  @group(${locations.mapSampler[0]}) @binding(${locations.mapSampler[1]}) var map_sampler: sampler;
#endif
#if ~{def.emissiveMap}
  @group(${locations.emissiveMap[0]}) @binding(${locations.emissiveMap[1]}) var emissiveMap: texture_2d<f32>;
  @group(${locations.emissiveMapSampler[0]}) @binding(${locations.emissiveMapSampler[1]}) var emissiveMap_sampler: sampler;
#endif
#if ~{def.ambientMap}
  @group(${locations.ambientMap[0]}) @binding(${locations.ambientMap[1]}) var ambientMap: texture_2d<f32>;
  @group(${locations.ambientMapSampler[0]}) @binding(${locations.ambientMapSampler[1]}) var ambientMap_sampler: sampler;
#endif
#if ~{def.diffuseMap}
  @group(${locations.diffuseMap[0]}) @binding(${locations.diffuseMap[1]}) var diffuseMap: texture_2d<f32>;
  @group(${locations.diffuseMapSampler[0]}) @binding(${locations.diffuseMapSampler[1]}) var diffuseMap_sampler: sampler;
#endif
#if ~{def.specularMap}
  @group(${locations.specularMap[0]}) @binding(${locations.specularMap[1]}) var specularMap: texture_2d<f32>;
  @group(${locations.specularMapSampler[0]}) @binding(${locations.specularMapSampler[1]}) var specularMap_sampler: sampler;
#endif
#if ~{def.normalMap}
  @group(${locations.normalMap[0]}) @binding(${locations.normalMap[1]}) var normalMap: texture_2d<f32>;
  @group(${locations.normalMapSampler[0]}) @binding(${locations.normalMapSampler[1]}) var normalMap_sampler: sampler;
#endif
#if ~{def.map_uvOffset}
  @group(${locations.map_uvOffset[0]}) @binding(${locations.map_uvOffset[1]})  var<uniform> map_uvOffset:vec2<f32> ;
#endif
struct Material{
  color : vec4<f32>,//0-3
  emissive : vec3<f32>,//4-6
  opacity : f32,//7
  ambient:vec3<f32>,//8-10
  aoMapIntensity:f32,//11
  diffuse:vec3<f32>,//12-14
  alphaCutoff : f32,//15
  specular:vec3<f32>,//16-18
  shininess:f32,//19
  refuseLight:f32,//20
  sdfFrom:f32,//21,
  sdfTo:f32,//22
  pickColor:vec3<f32>//24
}
var<private> material:Material;
`
